]> dgit.raspbian.org Git - gnome-shell.git/log
gnome-shell.git
7 years agocleanup: Port non-GObject classes to JS6 classes
Florian Müllner [Tue, 31 Oct 2017 01:19:44 +0000 (02:19 +0100)]
cleanup: Port non-GObject classes to JS6 classes

ES6 finally adds standard class syntax to the language, so we can
replace our custom Lang.Class framework with the new syntax. Any
classes that inherit from GObject will need special treatment,
so limit the port to regular javascript classes for now.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361

7 years agost-button: Handle touch-cancel events
verdre [Fri, 18 Jan 2019 08:37:04 +0000 (09:37 +0100)]
st-button: Handle touch-cancel events

Handling those events is neccessary if a touch event that pressed down a
button turns out to be a gesture. In this case the button should be
released without emitting the clicked signal.

7 years agowindowManager: detect change to a non-existent WS
Sergio Costas [Thu, 24 Jan 2019 22:06:48 +0000 (23:06 +0100)]
windowManager: detect change to a non-existent WS

When using dynamic workspaces, it is possible to try to change to a
non-existent one if the user defines hotkeys for changing to desktop
1, 2, 3... This case is not detected, and gnome shell shows an error:

JS ERROR: TypeError: workspace is null
actionMoveWorkspace@resource:///org/gnome/shell/ui/windowManager.js:2130:13
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
_showWorkspaceSwitcher@resource:///org/gnome/shell/ui/windowManager.js:2104:13
wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22

This patch adds a check before trying to change the workspace, to avoid
switching to a non-existent one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/365

7 years agotexture-cache: Simplify function with g_autoptr
Georges Basile Stavracas Neto [Thu, 24 Jan 2019 18:02:30 +0000 (16:02 -0200)]
texture-cache: Simplify function with g_autoptr

st_texture_cache_reset_texture() is slightly easier to
read and follow by using g_autoptr, so use that.

7 years agotexture-cache: Avoid creating unnecessary ClutterImages
Georges Basile Stavracas Neto [Thu, 24 Jan 2019 15:57:40 +0000 (13:57 -0200)]
texture-cache: Avoid creating unnecessary ClutterImages

After loading the GdkPixbuf, StTextureCache unconditionally
creates a ClutterImage and, if it's not in the cache, add
it to the cache. That's a waste of resources when the image
is already committed to the texture cache.

Fix that by reusing the ClutterImage of the cache if it is
already there; otherwise, create a new ClutterImage as we
were previously doing.

7 years agotexture-cache: Replace ClutterTexture by ClutterImage
Georges Basile Stavracas Neto [Thu, 24 Jan 2019 15:42:14 +0000 (13:42 -0200)]
texture-cache: Replace ClutterTexture by ClutterImage

ClutterTexture is a deprecated class that is simultaneously
an actor, and the content of the actor. Clutter's new model
is to separate painting (via ClutterContent) from actors.

Currently, StTextureCache relies on ClutterTexture to store
the loaded textures. This not only does not match the latest
practices of Clutter, but also generates various compile-time
warnings.

Port StTextureCache to store ClutterImages instead of storing
ClutterTextures. ClutterImage exposes the internal CoglTexture,
so no helpers are needed to match the current StTextureCache
API. Aspect ratio was dropped, but from my testing, it doesn't
change anything.

7 years agokeyboard: Disconnect from input source manager when destroying indicator
Philip Withnall [Fri, 18 Jan 2019 13:23:36 +0000 (13:23 +0000)]
keyboard: Disconnect from input source manager when destroying indicator

When an InputSourceIndicator is destroyed, the InputSourceManager it was
connected to could (and probably will) outlive it (since the manager is
a singleton). If the InputSourceManager emits any subsequent signals,
the callbacks from the finalised InputSourceIndicator could be invoked,
and will reference finalised objects.

This can be triggered by running `pkexec true` from a gnome-terminal
window, then calling `pkill pkexec` from another terminal (on a
different VT or via SSH). This causes the dialogue to be cancelled by
polkitd.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/357

7 years agopolkitAgent: Disconnect from user signals when closing dialogue
Philip Withnall [Fri, 18 Jan 2019 13:22:33 +0000 (13:22 +0000)]
polkitAgent: Disconnect from user signals when closing dialogue

Otherwise the user object could outlive the dialogue, emit a subsequent
signal, and the callback from that signal could reference finalised
objects/widgets from the dialogue. The likely mechanism for the user
outliving the dialogue is caching of user objects within
libaccountsservice.

This can be triggered by running `pkexec true` from a gnome-terminal
window, then calling `pkill pkexec` from another terminal (on a
different VT or via SSH). This causes the dialogue to be cancelled by
polkitd.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/357

7 years agopolkitAgent: Destroy session from dialogue closed handler
Philip Withnall [Mon, 21 Jan 2019 18:11:59 +0000 (18:11 +0000)]
polkitAgent: Destroy session from dialogue closed handler

Rather than explicitly destroying the session after calling close(),
destroy it from the `closed` signal handler.

This also means we can make the method internal.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/357

7 years agopolkitAgent: Drop close() override in favour of closed signal
Philip Withnall [Mon, 21 Jan 2019 18:10:42 +0000 (18:10 +0000)]
polkitAgent: Drop close() override in favour of closed signal

In case there are any internal ways the dialogue can close itself
without calling its own close() method, it’s probably better to do all
our cleanup on a handler for the `closed` signal instead.

This should introduce no functional changes except ensuring the
polkitAgent cleanup is always done.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/357

7 years agopolkitAgent: Disconnect session signal handlers when destroying session
Philip Withnall [Fri, 18 Jan 2019 13:19:32 +0000 (13:19 +0000)]
polkitAgent: Disconnect session signal handlers when destroying session

Otherwise the session could outlive the dialogue, emit a subsequent
signal, and its callback would reference finalised objects/widgets from
the dialogue. The PolkitSession object is implemented by
libpolkit-gobject, so we have no guarantees about its reference counting
— the session object could keep itself alive in another thread, or be a
singleton. In all likelihood, the session hangs around for longer than
the dialogue due to differences in when the two objects are garbage
collected.

This can be triggered by running `pkexec true` from a gnome-terminal
window, then calling `pkill pkexec` from another terminal (on a
different VT or via SSH). This causes the dialogue to be cancelled by
polkitd.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/357

7 years agosearch: Initialise searchInProgress when search providers are registered
Philip Withnall [Fri, 18 Jan 2019 13:17:21 +0000 (13:17 +0000)]
search: Initialise searchInProgress when search providers are registered

This avoids the following warning sometimes happening later:

JS WARNING: [resource:///org/gnome/shell/ui/search.js 701]: reference to undefined property "searchInProgress"

Signed-off-by: Philip Withnall <withnall@endlessm.com>
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/357

7 years agoUpdate Catalan translation
Jordi Mas [Thu, 24 Jan 2019 10:31:05 +0000 (11:31 +0100)]
Update Catalan translation

7 years agoanimation: Disable spinner animations when actor is destroyed
Florian Müllner [Wed, 23 Jan 2019 22:40:18 +0000 (23:40 +0100)]
animation: Disable spinner animations when actor is destroyed

There's nothing to animate anymore, just a source for warnings when
trying to access a destroyed object.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/362

7 years agocalendar: Rename "Clear All" button
Florian Müllner [Tue, 15 Jan 2019 16:46:49 +0000 (17:46 +0100)]
calendar: Rename "Clear All" button

While it hasn't really cleared everything previously (media notifications),
it does less so now. Update the button label to reflect that.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262

7 years agocalendar: Remove ability to hide events
Florian Müllner [Mon, 17 Dec 2018 17:58:57 +0000 (18:58 +0100)]
calendar: Remove ability to hide events

The functionality is no longer exposed, so remove it altogether.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262

7 years agocalendar: Don't allow event messages to be closed
Florian Müllner [Mon, 17 Dec 2018 17:36:03 +0000 (18:36 +0100)]
calendar: Don't allow event messages to be closed

The built-in calendar isn't meant to replace a full-fledged calendar
app, which is why clearing event messages only hides the event in
gnome-shell rather than deleting the actual event. This has turned out
to not be overly useful and often confusing - it creates a discrepancy
with visible events in apps, isn't revertible in a non-obscure fashion
and non-obviously limited to the current date.

As we are considering moving events out of the message list and back to
the calendar, it looks like a good time to remove that ability and keep
notifications as the only removable messages.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/262

7 years agomessageTray: Chain up in NotificationPolicy constructor
Florian Müllner [Tue, 11 Dec 2018 10:17:30 +0000 (11:17 +0100)]
messageTray: Chain up in NotificationPolicy constructor

We currently deliberately avoid chaining up in derived policy
constructors to not override properties with their defaults.
That's a neat trick that will stop working when porting to ES6
classes, as chaining up is necessary to actually initialize the
object there (including "this").

Address this by turning all properties into (overridable) getters
that are backed by private properties by default.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/350

7 years agomessageTray: Split out policy creation
Florian Müllner [Wed, 1 Nov 2017 18:21:31 +0000 (19:21 +0100)]
messageTray: Split out policy creation

The _createPolicy() method of a subclass usually depends on some
constructor parameters that need to be set before chaining up to
the parent. This works fine with Lang.Class, but will break with
ES6 classes, as "this" is only initialized after chaining up.

Prepare for this by not creating the policy in the constructor,
but when it is first accessed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/350

7 years agolookingGlass: Stop using eval()
Florian Müllner [Fri, 30 Nov 2018 15:57:47 +0000 (16:57 +0100)]
lookingGlass: Stop using eval()

Its use is not only strongly discouraged[0], we also rely on it injecting
variables into the global scope to get command-line-like behavior. That
behavior is incompatible with strict mode[1], and in extension with ES6
classes (which imply strict mode).

So to prepare for porting to ES6 classes, replace it with a somewhat less
evil construct that is compatible with strict mode.

[0] https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval#Do_not_ever_use_eval!
[1]
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode#Simplifying_variable_uses

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/350

7 years agodocs: Remove obsolete Lang references
Florian Müllner [Tue, 27 Nov 2018 22:42:26 +0000 (23:42 +0100)]
docs: Remove obsolete Lang references

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/350

7 years agocleanup: Remove obsolete Lang imports
Florian Müllner [Tue, 27 Nov 2018 23:09:49 +0000 (00:09 +0100)]
cleanup: Remove obsolete Lang imports

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/350

7 years agoUpdate Afrikaans translation
Pieter Schalk Schoeman [Sun, 20 Jan 2019 23:04:31 +0000 (23:04 +0000)]
Update Afrikaans translation

7 years agothunderbolt: only try to enroll if we are allowed
Christian Kellner [Thu, 17 Jan 2019 14:22:14 +0000 (15:22 +0100)]
thunderbolt: only try to enroll if we are allowed

Check via Polkit if the current user is actually allowed to enroll
devices before trying to do so. If not, show a notification that
explains that a system administrator needs to authorize the device.
Clicking on the notification will guide the user to the thunderbolt
control center panel. Before this patch, when the current user was
not allowed to enroll a device a polkit dialog would pop up which
is confusing because it did not contain any information why it was
shown. This patch implements the behavior as designed (see [1],
section "Multi-user environments").

[1] https://wiki.gnome.org/Design/Whiteboards/ThunderboltAccess

7 years agomedia section: Change size of the fallback cover
Ignat Loskutov [Thu, 13 Sep 2018 18:14:05 +0000 (18:14 +0000)]
media section: Change size of the fallback cover

Fallback cover used to be larger than the non-fallback one,
making the media controls look inconsistent.

7 years agoUpdate French translation
Charles Monzat [Thu, 17 Jan 2019 16:58:26 +0000 (16:58 +0000)]
Update French translation

(cherry picked from commit ee97f73521a183952a4840429ea5e956fdb64bb1)

7 years agonotificationDaemon.js: Fix a typo (missing ')')
Daniel van Vugt [Thu, 17 Jan 2019 03:55:04 +0000 (11:55 +0800)]
notificationDaemon.js: Fix a typo (missing ')')

Introduced in e0a992af7353 it was preventing gnome-shell from starting.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/915

7 years agonotificationDaemon: Fix warning
Florian Müllner [Fri, 23 Nov 2018 16:57:59 +0000 (17:57 +0100)]
notificationDaemon: Fix warning

Since commit 33b8537bf5, we unconditionally access the 'image-path'
hint, resulting in a gjs warning if the hint is not defined.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/309

7 years agoRemove deprecated CoglHandle
Niels De Graef [Sat, 24 Nov 2018 11:37:19 +0000 (12:37 +0100)]
Remove deprecated CoglHandle

Prefer something a bit more type-safe instead and in the meantime use
the newly available `cogl_clear_object` to simplify some code a bit.

7 years agocalendar: Disconnect signals when resetting notification
Florian Müllner [Fri, 23 Nov 2018 15:22:45 +0000 (16:22 +0100)]
calendar: Disconnect signals when resetting notification

Since commit 5fb8d4f730, a NotificationMessage's notification property
is reset to null when the notification is destroyed. However at that
point we still have connected signal handlers around that we'll try
to disconnect later.

Avoid the warnings by disconnecting and resetting the handler IDs at
the same time as the notification.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/308

7 years agoanimation: Optionally animate spinner start/stop
Florian Müllner [Wed, 28 Nov 2018 16:34:48 +0000 (17:34 +0100)]
animation: Optionally animate spinner start/stop

In contrast to generic animated icons, it is reasonable to expect
spinners to be invisible while inactive. Implement that behavior
in the new Spinner class and optionally animate the transitions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/316

7 years agoanimation: Add dedicated Spinner class
Florian Müllner [Wed, 28 Nov 2018 15:41:09 +0000 (16:41 +0100)]
animation: Add dedicated Spinner class

We use AnimatedIcon with the same resource all over the place, cut
down on the duplication by providing a dedicated class.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/316

7 years agoinputMethod: Delete the enabled member since it's not used
Takao Fujiwara [Tue, 11 Dec 2018 07:18:59 +0000 (16:18 +0900)]
inputMethod: Delete the enabled member since it's not used

When `ibus restart` runs, InputMethod.enabled is changed to false
and no longer enable ibus but 'enabled' and 'disabled' signals
are not used in the current IBus clients and it's good to delete
the member simply.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/295

7 years agoaudioDeviceSelection: Only include settings button when allowed
Florian Müllner [Tue, 15 Jan 2019 19:12:04 +0000 (20:12 +0100)]
audioDeviceSelection: Only include settings button when allowed

https://gitlab.gnome.org/GNOME/gnome-shell/issues/909

7 years agokeyboard: Use addSettingsItem() in language menu
Florian Müllner [Thu, 15 Nov 2018 14:38:11 +0000 (15:38 +0100)]
keyboard: Use addSettingsItem() in language menu

If the session mode doesn't allow access to Settings, the language
menu should respect that and not expose the "Region & Languages"
panel. Using the dedicated method instead of manually constructing
the menu item takes care of that and makes for less code.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/780

7 years agoAdd Iagno to appFavorites
Bilal Elmoussaoui [Tue, 15 Jan 2019 15:31:13 +0000 (15:31 +0000)]
Add Iagno to appFavorites

7 years agoUpdate Esperanto translation
Carmen Bianca BAKKER [Mon, 14 Jan 2019 21:48:02 +0000 (21:48 +0000)]
Update Esperanto translation

7 years agoUpdated Spanish translation
Daniel Mustieles [Mon, 14 Jan 2019 14:43:41 +0000 (15:43 +0100)]
Updated Spanish translation

7 years agoBump version to 3.31.4
Florian Müllner [Thu, 10 Jan 2019 19:37:30 +0000 (20:37 +0100)]
Bump version to 3.31.4

Update NEWS.

7 years agobuild: Remove Canberra dependency
Carlos Garnacho [Tue, 8 Jan 2019 16:19:21 +0000 (17:19 +0100)]
build: Remove Canberra dependency

It is no longer direct, but rather through mutter API.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327

7 years agoglobal: Drop API to play sounds
Carlos Garnacho [Thu, 13 Dec 2018 19:37:24 +0000 (20:37 +0100)]
global: Drop API to play sounds

All callers have been updated to use MetaSoundPlayer. This drops direct
usage of libcanberra-gtk, and the X11 connection indirectly. One thing
worth noting is that we pass less metadata (eg. event x/y that might be
used for surrounding effects). This was all largely unused, so the
MetaSoundPlayer was made simpler.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327

7 years agovolume: Port to MetaSoundPlayer for emitting sounds
Carlos Garnacho [Thu, 13 Dec 2018 19:33:45 +0000 (20:33 +0100)]
volume: Port to MetaSoundPlayer for emitting sounds

Move away from ShellGlobal API, which is too tightly coupled to
libcanberra-gtk.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327

7 years agomessageTray: Port to MetaSoundPlayer for emitting sounds
Carlos Garnacho [Thu, 13 Dec 2018 19:32:16 +0000 (20:32 +0100)]
messageTray: Port to MetaSoundPlayer for emitting sounds

Move away from ShellGlobal API, which is too tightly coupled to
libcanberra-gtk. The app ID/name seem unused in canberra, so we
may simplify this to a single case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327

7 years agoautomountManager: Port to MetaSoundPlayer for emitting sounds
Carlos Garnacho [Thu, 13 Dec 2018 19:30:22 +0000 (20:30 +0100)]
automountManager: Port to MetaSoundPlayer for emitting sounds

Move away from ShellGlobal API, which is too tightly coupled to
libcanberra-gtk.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/327

7 years agodnd: Repick target actor if destroyed mid iteration
Jonas Ådahl [Thu, 3 Jan 2019 10:53:13 +0000 (11:53 +0100)]
dnd: Repick target actor if destroyed mid iteration

The picked target actor may be destroyed (e.g. hover style change
resulting in the ClutterTexture to be destroyed). If we don't handle
this, GJS will abort when it sees the exception caused by Javascript
code trying to access the destroyed target actor.

To handle it, listen on the 'destroy' signal on the target actor, and
repick, so a valid actor is passed to the next motion callback.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/632
7 years agolayout: Always allow hiding the overview
Pascal Nowack [Fri, 21 Sep 2018 14:58:26 +0000 (16:58 +0200)]
layout: Always allow hiding the overview

When a fullscreen application is focused,
toggling the overview via hot-corner is disabled,
even when the overview is currently visible.
This only makes sense, when the overview is
hidden to not to disturb the behaviour of the
fullscreen application, but leaves an
inconsistency when the overview is visible since
it should work there like when a non-fullscreen-
application is focused.

So, always allow hiding the overview using the
hot corner when the overview is visible.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/429

7 years agointrospect: Add GetWindows method
Olivier Fourdan [Wed, 12 Dec 2018 15:02:29 +0000 (16:02 +0100)]
introspect: Add GetWindows method

The `GetWindows` method gives access to the list of windows for each
application with some of their properties, so utilities such as dogtail
can pick the window of their choice to interfere with using the provided
window id.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/326

7 years agoAdd app introspection API
Jonas Ådahl [Wed, 5 Sep 2018 09:15:30 +0000 (11:15 +0200)]
Add app introspection API

Add a D-Bus API that allows the API user to introspect the application
state of the shell. Currently the only exposed information is list of
running applications and which one is active (i.e. has focus).

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/326

7 years agoUpdate Japanese translation
Ryuta Fujii [Thu, 3 Jan 2019 07:25:23 +0000 (07:25 +0000)]
Update Japanese translation

7 years agoRemove the browser plugin
Michael Catanzaro [Mon, 31 Dec 2018 19:25:05 +0000 (13:25 -0600)]
Remove the browser plugin

The browser plugin is crashy and broken; there are dozens of bugs filed
against it on Bugzilla and nobody is looking at them. Chrome and Firefox
have both dropped support for NPAPI plugins. Epiphany still has support,
but it's hidden behind a gsetting and all the UI to enable it has been
removed, so very few users would be able to figure out how to enable.
I've even previously considered blacklisting this plugin in the past due
to all the crashes.

Since this plugin has not actually worked in any browsers for a long
time now, time to delete it.

https://bugzilla.gnome.org/show_bug.cgi?id=766776

7 years agoUpdate Swedish translation
Anders Jonsson [Fri, 28 Dec 2018 13:43:24 +0000 (13:43 +0000)]
Update Swedish translation

7 years agoUpdate Turkish translation
Emin Tufan Çetin [Tue, 25 Dec 2018 16:47:26 +0000 (16:47 +0000)]
Update Turkish translation

7 years agoUpdate Friulian translation
Fabio Tomat [Mon, 24 Dec 2018 18:05:47 +0000 (18:05 +0000)]
Update Friulian translation

7 years agoReplace Bugzilla by Gitlab URL in DOAP file
Andre Klapper [Sat, 15 Dec 2018 22:26:54 +0000 (23:26 +0100)]
Replace Bugzilla by Gitlab URL in DOAP file

7 years agothunderbolt: fix missing variable underscore for `enrolling`
RyuzakiKK [Fri, 7 Dec 2018 09:51:39 +0000 (10:51 +0100)]
thunderbolt: fix missing variable underscore for `enrolling`

The variable `this.enrolling` is a typo because it has not been defined
before and is also never used.
`this._enrolling` is what it was meant to be.

7 years agomessageTray: Re-enable unredirection when banner is destroyed
Florian Müllner [Thu, 22 Nov 2018 17:18:34 +0000 (18:18 +0100)]
messageTray: Re-enable unredirection when banner is destroyed

The intention of commit 4dc20398 was to disable unredirection while
banners are shown, but the ::done-displaying signal currently used for
re-enabling unredirection is only emitted under some circumstances, so
it's possible that unredirection is left disabled indefinitely, whoops.

Fix this by tying disabling unredirection explicitly to the lifetime
of the banner actor.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/799

7 years agost: Avoid integer overflow on unpremultiply
Florian Müllner [Thu, 22 Nov 2018 19:41:44 +0000 (20:41 +0100)]
st: Avoid integer overflow on unpremultiply

When computing the effective border color, we operate on colors with
premultiplied alpha to simplify the calculations, then unpremultiply
the result. However we miss a bounds check in the last check, so any
color component can overflow the allowed maximum of 0xff and shift the
result in unexpected ways.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/305

7 years agoStWidget: don't forget to invalidate the paint state if not on stage
Cosimo Cecchi [Wed, 21 Nov 2018 02:25:51 +0000 (18:25 -0800)]
StWidget: don't forget to invalidate the paint state if not on stage

If the actor is not on the stage yet (i.e. does not have a theme
node), but has a paint state cached, we currently fail to invalidate
it, which will lead to the actor painting with old contents once it
gets onto the stage.

This commit fixes the issue by changing our invalidation strategy;
previously we were looking at the widget's own theme node to determine
if it should be invalidated or not.
Now we look at the theme nodes of our cached paint states. When the
widget is mapped on stage, those are the same as the widget's own
theme node, but when the widget is not on the stage, we'll still be
able to invalidate them.

As part of this, we move the invalidation API to StThemeNodePaintState,
which is a more natural place for our use case.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/314

7 years agoUpdated Spanish translation
Daniel Mustieles [Tue, 4 Dec 2018 15:39:42 +0000 (16:39 +0100)]
Updated Spanish translation

7 years agoUpdated Slovenian translation
Matej Urbančič [Sun, 2 Dec 2018 17:06:02 +0000 (18:06 +0100)]
Updated Slovenian translation

7 years agoUpdate Esperanto translation
Kristjan SCHMIDT [Wed, 28 Nov 2018 09:05:52 +0000 (09:05 +0000)]
Update Esperanto translation

7 years agoiconGrid: Eliminate JavaScript for painting/picking
Daniel van Vugt [Fri, 23 Nov 2018 08:43:34 +0000 (16:43 +0800)]
iconGrid: Eliminate JavaScript for painting/picking

The only reason for `vfunc_paint` and `vfunc_pick` existing was to
implement a culling optimization. Although that optimization actually
made performance worse than none at all because it forced the painting
and picking cycles to spend more time calling into JavaScript.

Turns out we don't have to choose between native code and culling though.
Just reimplement the culling using native ClutterActor functions and we
get the benefits of both.

Performance on an i7-7700:

Moving the cursor over the icon grid:
Before: 70% CPU, 5.5ms per frame
After : 60% CPU, 4.5ms per frame

Scrolling the icon grid:
Before: 60% CPU, 4.4ms per frame
After : 50% CPU, 3.3ms per frame

Helps with https://gitlab.gnome.org/GNOME/gnome-shell/issues/174

7 years agost-button: Ignore pointer emulated touch events
Marco Trevisan (Treviño) [Thu, 25 Oct 2018 04:35:25 +0000 (06:35 +0200)]
st-button: Ignore pointer emulated touch events

In X11, pointer emulated touch events are replicated with normal PRESS, RELEASE
pair events which are generated by the server. Thus for a single tap we get:
 - TOUCH_BEGIN -> TOUCH_END, PRESS -> RELEASE

This will cause st-button to send two "clicked" signals, instead of just one,
breaking extensions (like dash-to-dock) that show buttons in the main stage
which will be checked two times or that will receive the same signal two times.

7 years agotheme: Replace calendar arrow images with symbolic icons and CSS
daniruiz [Tue, 20 Nov 2018 16:55:31 +0000 (17:55 +0100)]
theme: Replace calendar arrow images with symbolic icons and CSS

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/301

7 years agomeson.build: Bump compatible mutter API version to 4
Jonas Ådahl [Fri, 23 Nov 2018 13:46:51 +0000 (14:46 +0100)]
meson.build: Bump compatible mutter API version to 4

7 years agoshell: Hide/drop unused public API
Carlos Garnacho [Wed, 22 Aug 2018 22:02:37 +0000 (00:02 +0200)]
shell: Hide/drop unused public API

These static methods won't work as-is as MetaStartupSequence API in
JS bindings. Luckily those are used nowhere there.

7 years agoshell: Use MetaStartupNotification
Carlos Garnacho [Wed, 22 Aug 2018 22:00:36 +0000 (00:00 +0200)]
shell: Use MetaStartupNotification

This is "API compatible" with ShellStartupNotification, so only
C changes are necessary.

7 years agotheme: Drop custom assets for window close buttons in overview
Sam Hewitt [Fri, 16 Nov 2018 16:15:44 +0000 (11:15 -0500)]
theme: Drop custom assets for window close buttons in overview

They can be replaced by a themed icon and some CSS styling.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/782

7 years agotheme: Replace page indicator assets with css
Sam Hewitt [Fri, 16 Nov 2018 18:44:52 +0000 (13:44 -0500)]
theme: Replace page indicator assets with css

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/297

7 years agotheme: Replace corner ripple png assets with css
Sam Hewitt [Fri, 16 Nov 2018 19:05:05 +0000 (14:05 -0500)]
theme: Replace corner ripple png assets with css

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/298

7 years agodash: destroy items's child before tooltip
Andrea Azzarone [Fri, 16 Nov 2018 18:31:56 +0000 (18:31 +0000)]
dash: destroy items's child before tooltip

Destroy the DashItemContainer's child from the same handler as the tooltip. This
will prevent invalid reads when the item is destroyed while its quicklist is
still open.

Fixes: https://gitlab.gnome.org/GNOME/gnome-shell/issues/781
7 years agoaltSwitcher: Fix error when all alternatives are disabled
Florian Müllner [Fri, 16 Nov 2018 10:39:08 +0000 (11:39 +0100)]
altSwitcher: Fix error when all alternatives are disabled

While we do consider the case that we don't have a child to show for the
visibility, we are still trying to move the click action unconditionally.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/783

7 years agoibusManager: Don't pass undefined callback to ibus
Florian Müllner [Thu, 15 Nov 2018 17:47:55 +0000 (18:47 +0100)]
ibusManager: Don't pass undefined callback to ibus

Since commit 551e8278416, we don't always pass a callback parameter.
However passing it on as undefined to ibus doesn't work, as gjs doesn't
accept that as a valid callback value and throw an error. As a result,
we can end up with no layout selected in the keyboard menu and an "empty"
indicator. Fix this by explicitly passing null if no callback has been
provided.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/293

7 years agoapp-usage: Remove more unused things
Jasper St. Pierre [Mon, 9 Apr 2012 07:10:35 +0000 (04:10 -0300)]
app-usage: Remove more unused things

https://bugzilla.gnome.org/show_bug.cgi?id=673767

7 years agoapp-usage: Remove unused open-window-count attribute
Jasper St. Pierre [Mon, 9 Apr 2012 07:08:07 +0000 (04:08 -0300)]
app-usage: Remove unused open-window-count attribute

Since this has already been unused and was inaccessible, this shouldn't
matter too much.

https://bugzilla.gnome.org/show_bug.cgi?id=673767

7 years agoapp-usage: Remove crufty old "context"s idea
Jasper St. Pierre [Mon, 9 Apr 2012 06:27:47 +0000 (03:27 -0300)]
app-usage: Remove crufty old "context"s idea

Back in the day, there was a proposed system of tracking apps in a
specific context.

The inspiration was that you may have used apps in multiple modes:
Firefox may have been used in both "Programmer Reference" and
"Kitten Videos" contexts. Early user response to the feedback wasn't
too positive - context switching is something that humans have trouble
doing implicitly, let alone explicitly. The old codebase still has a
few remnants of this around; let's finally put them to rest.

Note that we still write out a dummy context tag to the XML file - old
versions of the shell will flat out crash if you don't have one of those
in there, so just leave it in for compatibility sake.

https://bugzilla.gnome.org/show_bug.cgi?id=673767

7 years agopower: Label the PENDING_CHARGE state as "Not Charging"
João Paulo Rechi Vita [Fri, 2 Nov 2018 20:51:33 +0000 (13:51 -0700)]
power: Label the PENDING_CHARGE state as "Not Charging"

The pending-charge state means AC power is on but the battery is not
being charged. This can happen because its charge is above a certain
threshold, to avoid short charging cycles and prolong the battery's
life, or because the PSU is not powerful enough to charge the batteries.

Instead of lying to the user about something being estimated, we should
simply tell the truth and set the label to "Not Charging".

Closes: #701.
7 years agowindowAttentionHandler: Fix syntax errors
Florian Müllner [Wed, 14 Nov 2018 18:38:33 +0000 (19:38 +0100)]
windowAttentionHandler: Fix syntax errors

Gah, why didn't we catch those?!

7 years agowindowAttentionHandler: Handle XUrgencyHint as well
Florian Müllner [Fri, 13 Jul 2018 17:16:14 +0000 (19:16 +0200)]
windowAttentionHandler: Handle XUrgencyHint as well

While it's not commonly used, it is easy enough to handle it the
same as the demands-attention hint, so do just that.

https://bugzilla.gnome.org/show_bug.cgi?id=643595

7 years agoBump version to 3.31.2
Florian Müllner [Wed, 14 Nov 2018 00:03:18 +0000 (01:03 +0100)]
Bump version to 3.31.2

Update NEWS.

7 years agoworkspace: Confine caption width to workspace area
Florian Müllner [Sat, 1 Sep 2018 16:57:59 +0000 (18:57 +0200)]
workspace: Confine caption width to workspace area

When we started to only show a single caption at a time, we allowed
title captions to be wider than their corresponding window preview.
But while overlapping neighboring previews is fine, we shouldn't
allow the captions to leak outside the workspace area itself and
overlap unrelated elements like workspace switcher or dash.

This partly reverts commit b3b30f239d.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/214

7 years agoworkspace: Remove dead code
Florian Müllner [Mon, 1 Oct 2018 14:24:22 +0000 (16:24 +0200)]
workspace: Remove dead code

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/214

7 years agoinputMethod: Keep track of preedit string visibility
Carlos Garnacho [Tue, 13 Nov 2018 17:28:15 +0000 (18:28 +0100)]
inputMethod: Keep track of preedit string visibility

So we can silence update-preedit-text signals that keep the
preedit string invisible.

https://gitlab.gnome.org/GNOME/gtk/issues/1447

7 years agoinputMethod: Avoid calling set_preedit_text() if unnecessary
Carlos Garnacho [Tue, 13 Nov 2018 17:26:13 +0000 (18:26 +0100)]
inputMethod: Avoid calling set_preedit_text() if unnecessary

This is easier down on clients.

7 years agowindowManager: make TouchpadWorkspaceSwitchAction respect natural-scroll
Erik Duxstad [Mon, 5 Nov 2018 23:13:26 +0000 (17:13 -0600)]
windowManager: make TouchpadWorkspaceSwitchAction respect natural-scroll

Instead of defaulting to a natural scroll behavior,
have the workspace switch action use the natural-scroll setting
in org.gnome.peripherals.touchpad to determine the correct
direction of travel when swiping. 4 finger swipes will then
match the behavior of the rest of the UI.

Reference: https://gitlab.gnome.org/GNOME/gnome-shell/issues/516

7 years agonotificationDaemon: Don't pass unused extra hints value
Marco Trevisan (Treviño) [Fri, 9 Nov 2018 08:08:25 +0000 (02:08 -0600)]
notificationDaemon: Don't pass unused extra hints value

Probably this is a leftover of old implementations of _iconForNotificationData,
but right now this only takes a value, so just pass one.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/285

7 years agonotificationDaemon: support file:// or icon theme names for image-path
Marco Trevisan (Treviño) [Fri, 9 Nov 2018 08:01:28 +0000 (02:01 -0600)]
notificationDaemon: support file:// or icon theme names for image-path

While this sounds counter-intuitive, the image-path hint value might also
be used with URIs or icon names.

As per freedesktop standard:
  The "app_icon" parameter and "image-path" hint should be either an URI
  (file:// is the only URI schema supported right now) or a name in a
  freedesktop.org-compliant icon theme (not a GTK+ stock ID).

Thus the image-path hint should also be parsed as it happens for the
app_icon.

Reuse same logic, by falling back on _iconForNotificationData with the
hint value.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/285

7 years agost: Remove deprecated cogl_texture_new()
Georges Basile Stavracas Neto [Sun, 11 Nov 2018 00:41:28 +0000 (22:41 -0200)]
st: Remove deprecated cogl_texture_new()

cogl_texture_new() is used in a few places in GNOME Shell, but
it's a deprecated Cogl function. The replacement is the less
verbose cogl_texture_2d_new_with_size(), that is very much a
straightforward replacement.

Remove the few places where this function is used, replacing
it by the CoglTexture2d counterpart.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/287

7 years agocalendar: do not call destroy() recursively
Cosimo Cecchi [Thu, 11 Oct 2018 02:08:38 +0000 (19:08 -0700)]
calendar: do not call destroy() recursively

We have a callback that will call close() when the notification is
destroyed, and a callback that will call destroy() on the notification
when the message is closed.

Currently, if the notification is destroyed we'll execute our callback
that will call again destroy() on the notification. That's bad
practice in general, and it also has the side effect of resetting the
destroy reason.

This commit avoids re-destroying the notification by dropping the
notification reference on destroy.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/258

7 years agonotificationDaemon: use different reason when replacing notification
Cosimo Cecchi [Thu, 11 Oct 2018 01:26:31 +0000 (18:26 -0700)]
notificationDaemon: use different reason when replacing notification

Differently from the fd.o notifications, Gtk notifications do not
have a mechanism to update themselves. Instead, when a new
notification is received for an ID already known to the notification
daemon, the old notification is dismissed and a replaced with a new
one.

Currently though, there is no way to distinguish a notification that
was dismissed because of an user interaction, or because it was
replaced. That is an useful piece of information, so add a new value
to the NotificationDestroyedReason enum to account for it.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/258

7 years agonotificationDaemon: separate out GtkNotification creation
Cosimo Cecchi [Thu, 11 Oct 2018 00:28:43 +0000 (17:28 -0700)]
notificationDaemon: separate out GtkNotification creation

This way, source subclasses can easily use a notification subclass
if different functionality is required.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/258

8 years agoStTextureCache: use right event to detect file changes
Cosimo Cecchi [Fri, 9 Nov 2018 21:55:53 +0000 (13:55 -0800)]
StTextureCache: use right event to detect file changes

StTextureCache installs file monitors that invalidate caches when
contents of the underlying file change.
At the moment, the cache uses the Gio.FileMonitorEvent.CHANGED event
type to make that determination.

However, that is suboptimal for at least two reasons:
- while a file is being written to disk, many CHANGED events will be
  emitted in sequence. That will cause needless cache invalidations,
  and we will risk loading the file before it's fully loaded.
- if an existing file is replaced, e.g. with g_file_replace(), we may
  not get a CHANGED event but a CREATED one instead, so the cache ends
  up never getting invalidated.

The good news is that in both of those cases GFileMonitor will send a
CHANGES_DONE_HINT event after changes have settled, or after the file
is replaced.

This commit fixes both cases by switching from the CHANGED event to
CHANGES_DONE_HINT to determine that a file has in fact changed.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/286

8 years agokeyboard: Do not call KeyboardManager.holdKeyboard() with set-content-type
Takao Fujiwara [Fri, 31 Aug 2018 11:22:23 +0000 (20:22 +0900)]
keyboard: Do not call KeyboardManager.holdKeyboard() with set-content-type

When gnome-shell receives the signal of 'set-content-type' from ibus,
gnome-shell calls KeyboardManager.holdKeyboard() and
KeyboardManager.releaseKeyboard() and the functions change the current
input focus in GNOME Xorg and it could result in closing a popup window
which has a password entry by focusing on the entry.
The solution is to stop to call the APIs on 'set-content-type' signal.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/391

8 years agomessageTray: Disable unredirection while showing banners
Florian Müllner [Sun, 12 Aug 2018 23:25:13 +0000 (01:25 +0200)]
messageTray: Disable unredirection while showing banners

We don't usually show notification banners while the monitor is in
fullscreen, but when we do - the notification is urgent - we should
actually show the banner, even if the top-most window is unredirected.
To achieve that, disable unredirection while the banner is showing.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/430

8 years agoworkspaces: Use correct schema for workspace settings
Florian Müllner [Thu, 8 Nov 2018 09:47:25 +0000 (10:47 +0100)]
workspaces: Use correct schema for workspace settings

The custom overrides system is gone, we need to use the original
mutter schema.

https://gitlab.gnome.org/GNOME/gnome-shell/issues/768

8 years agopolkit: Only unregister registered handles
Georges Basile Stavracas Neto [Thu, 22 Mar 2018 14:11:38 +0000 (11:11 -0300)]
polkit: Only unregister registered handles

If the initialization fails for some reason, for example by
running 'gnome-shell --replace', we should not crash because
of an attempt of unregistering an unregistered agent handle.

Fix that by checking if the handle is not NULL before calling
the unregistering routines.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/66

8 years agopolkit: Port to G_DECLARE_FINAL_CLASS
Georges Basile Stavracas Neto [Thu, 22 Mar 2018 13:50:20 +0000 (10:50 -0300)]
polkit: Port to G_DECLARE_FINAL_CLASS

So we can remove this old boilerplate code. In order to be able
to use that, the autoptr function for PolkitAgentListener was
added as well.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/66

8 years agoUpdate Spanish translation
Daniel Mustieles [Tue, 6 Nov 2018 11:04:19 +0000 (11:04 +0000)]
Update Spanish translation

8 years agoUpdate Brazilian Portuguese translation
Rafael Fontenelle [Mon, 5 Nov 2018 19:58:30 +0000 (19:58 +0000)]
Update Brazilian Portuguese translation

(cherry picked from commit e55bdb0fbbe4f0618b64461765161d4b2f697e7e)

8 years agoTheme: fix modal dialog button
Jakub Steiner [Fri, 2 Nov 2018 13:45:05 +0000 (14:45 +0100)]
Theme: fix modal dialog button

- allow for focused hover state

Fixes issue #727